package com.wsc.services.controller;


import com.wsc.services.util.RedisUtil;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/redis")
public class RedisController {
    @GetMapping("/get/{key}")
    public String getValue(@PathVariable("key") String key ) {
        return RedisUtil.get(key);

    }

    @PostMapping("/set")
    public void setValue(@RequestParam("key") String key, @RequestParam("value") String value) {
        RedisUtil.set(key, value);
    }
}
